<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
</head>

<body>
	<?php  include 'action/session_check.php'; //登录判断  ?>   
<table cellspacing="5px">
<tr>
<td colspan="14" align="center"><h2>订单信息处理</h2> </td></tr>
<tr>
   <td>订单编号</td><td>用户</td><td>订单金额</td><td>收货人</td>
   <td>收货地址</td><td>联系电话</td><td>备注</td><td>订单日期</td><td>状态</td><td colspan="3" align="center">操作</td>
</tr>
 <?php  
  require_once("../conn/conn_db.php");  //包含数据库连接文件  
  $sql = "select * from  Order_Info order by O_CreateTime desc" ; //查询语句
  $result = $conn->query($sql);  //执行SQL语句
  while($row = $result->fetch_array())   //遍历查询结果的每一行
  {
?>
  <tr class="tr_content">
    
    <td> <?php echo $row["O_Num"];?> </td>
    <td> <?php echo $row["M_Name"];?> </td>
    <td> ￥<?php echo $row["O_Money"];?> </td>
    <td> <?php echo $row["O_Taker"];?> </td>
    <td> <?php echo $row["O_Address"];?> </td>
    <td> <?php echo $row["O_Tel"];?> </td>
    <td> <?php echo $row["O_Remark"];?> </td>
    <td> <?php echo $row["O_CreateTime"];?> </td>
    <td>
    <?php switch ($row["O_Status"])
       {
     	case '0':
     		echo '<font color=red>待发货</font>';
     		break;
     	case '1':
     		echo '<font color=blue>已发货</font>';
     		break;
     	case '2':
     		echo '已结算';
     		break;
       }
     ?> 
     </td>
    <td><a href="action/order_action_do.php?Type=1&O_Num=<?php echo $row["O_Num"];?>">发货</a></td>
    <td><a href="action/order_action_do.php?Type=2&O_Num=<?php echo $row["O_Num"];?>">结算</a></td>
    <td><a href="order_info.php?O_Num=<?php echo $row["O_Num"];?>">详细信息</a></td>
  </tr>
<?php }   ?>
 </table>
</body>
</html>